package scheduler;

import java.util.List;

public class SimpleLinkRepository implements ILinkRepository
{
	private List<String> linkList; 

	SimpleLinkRepository(List<String> linkList)
	{
		this.linkList = linkList;
	}
	
	public synchronized void saveLinks(List<String> linklist)
	{
		this.linkList.addAll(linkList);
	}
	
	public synchronized String getLink()
	{
		if (linkList.size() > 0)
			return linkList.get(linkList.size()-1);
		else 
			return null;
	}
}
